﻿using UnityEngine;
using System.Collections;
using System.Threading;

public abstract class AniEffectDelay : AniEffectCall {

	public float delay;
	
	public void play (OReportDetail detail, CallBack complete) {
		if(delay <= 0) {
			base.play(detail, complete);
			
		} else {
			StartCoroutine(playDelay(detail, complete));
		}
	}
	
	IEnumerator playDelay(OReportDetail detail, CallBack complete) {
		yield return new WaitForSeconds(delay);
		base.play(detail, complete);
	}
}
